//
//  SNRepairAskModel.m
//  app
//
//  Created by 王少宁 on 15/8/31.
//  Copyright (c) 2015年 hdaren. All rights reserved.
//

#import "SNRepairAskModel.h"

@implementation SNCustomerServicesModel

- (instancetype)initWithDict:(NSDictionary *)dict
{
    if ([super init]) {
        _face = dict[@"face"];
        _nickname = dict[@"nickname"];
        _uid = [dict[@"uid"] stringValue];
    }
    return self;
}

+ (instancetype)modelWithDict:(NSDictionary *)dict{
    return [[self alloc] initWithDict:dict];
}

@end


@implementation SNRepairAskModel

- (instancetype)initWithDict:(NSDictionary *)dict
{
    if ([super init]) {
        NSArray * customerServices = dict[@"CustomerServices"];
        _customerServicesModel = [SNCustomerServicesModel modelWithDict:customerServices.firstObject];
        _address = dict[@"address"];
        _city = dict[@"city"];
        _district = dict[@"district"];
        _fullAddress = dict[@"fullAddress"];
        _ID = [dict[@"id"] stringValue];
        _mall_com_id = dict[@"mall_com_id"];
        _nation = dict[@"nation"];
        _phone = dict[@"phone"];
        _postcode = dict[@"postcode"];
        _province = dict[@"province"];
        _receiver = dict[@"receiver"];
        _selected = [dict[@"selected"] stringValue];
        _tel = dict[@"tel"];
        _address_params = dict[@"address_param"];
    }
    return self;
}

+ (instancetype)modelWithDict:(NSDictionary *)dict{
    return [[self alloc] initWithDict:dict];
}

@end
